import request from '@/utils/request'

export function getIncomeList(query) {
  return request({
    url: '/finances/incomeList',
    method: 'get',
    params: query
  })
}

export function companyIncomesList(query) {
  return request({
    url: '/finances/companyIncomesList',
    method: 'get',
    params: query
  })
}

export function getWithdrawList(query) {
  return request({
    url: '/finances/withdrawList',
    method: 'get',
    params: query
  })
}

export function withdrawApply(query) {
  return request({
    url: '/finances/withdrawApply',
    method: 'post',
    data: query
  })
}

export function business() {
  return request({
    url: '/finances/business',
    method: 'get'
  })
}

export function getCompanyRecentIncome() {
  return request({
    url: '/finances/companyRecentIncome',
    method: 'get'
  })
}

export function getRecentOrderCount() {
  return request({
    url: '/finances/recentOrderCount',
    method: 'get'
  })
}

export function getInvestList() {
  return request({
    url: '/members/payList',
    method: 'get'
  })
}

// export function addInvest(query) {
//   return request({
//     url: '/members/payAdd',
//     method: 'post',
//     data: query
//   })
// }
export function saveInvest(query) {
  return request({
    url: '/members/payAdd',
    method: 'post',
    data: query
  })
}

export function deleteInvest(query) {
  return request({
    url: '/members/payDelete',
    method: 'get',
    params: query
  })
}

export function explain(query) {
  return request({
    url: '/members/explain',
    method: 'post',
    data: query
  })
}